{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9a65c44a",
   "metadata": {},
   "source": [
    "# Introduction to ArcGIS Hub - Basic features\n",
    "\n",
    "ArcGIS Hub is a cloud-based engagement platform that enables organizations to communicate more effectively with their communities. ArcGIS Hub Basic is available with all ArcGIS Online subscriptions. Using Hub Basic, you can create unlimited websites and pages using the site editor and build a catalog of searchable content for each of your sites using the site's content library. Click [here](https://www.esri.com/en-us/arcgis/products/arcgis-hub/resources) to learn more about ArcGIS Hub."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9cc8498c",
   "metadata": {},
   "source": [
    ">_Note:_ The pattern to add, search, get, update and delete `Sites` and `Pages` is identical to that of [Initiatives](../hub-for-guide-premium) as demonstrated here. \n",
    "\n",
    "In this notebook, we will take a look at examples of how to\n",
    "* Create a site and pages\n",
    "* Clone a site within the same (Hub Basic) org, ArcGIS Enterprise orgs, and ArcGIS Hub Premium orgs\n",
    "* Link and unlink pages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "69b5b63f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from arcgis.gis import GIS"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "972dce0a",
   "metadata": {},
   "source": [
    "First, we will sign-in to an organization with Hub Basic capabilities for the purpose of demonstrating these workflows.\n",
    "\n",
    "> _Note:_ In order to replicate these workflows, you will have to sign-in using your own credentials for your ArcGIS organization. This notebook is only designed for demonstration purposes. You may also want to verify the features available to you, per your ArcGIS Hub licensing.\n",
    "\n",
    "If you are looking for examples for working with Initiatives and Events we have this [ArcGIS Hub Premium](../hub-premium-guide) guide. We also have a guide that uses [Enterprise Sites](../enterprise-sites-guide) to demonstrate site and page layouts and theme editing. \n",
    "\n",
    "Here are examples that demonstrate adding _sites_, _pages_ and cloning sites using ArcGIS Hub Basic."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "de1bf233",
   "metadata": {},
   "outputs": [],
   "source": [
    "gis1 = GIS(profile=\"your_online_hub_basic_profile\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bb4272f9",
   "metadata": {},
   "source": [
    "We will now connect to the Hub associated with this Web GIS."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "654623b8",
   "metadata": {},
   "outputs": [],
   "source": [
    "hub_basic = gis1.hub"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3ca6351e",
   "metadata": {},
   "source": [
    "### Adding new sites and pages\n",
    "\n",
    "ArcGIS Hub allows you to build configurable and branded websites for sharing internal and public content, such as apps, data, and media. You can build a Hub Basic Site using the ArcGIS API for Python as follows:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "99e27040",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=c5fae3cfd3e940d392a3f0d37159da5f' target='_blank'>\n",
       "                        <img src='http://static.arcgis.com/images/desktopapp.png' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=c5fae3cfd3e940d392a3f0d37159da5f' target='_blank'><b>Python Site</b>\n",
       "                        </a>\n",
       "                        <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\" width=16 height=16>Hub Site Application by creator1\n",
       "                        <br/>Last Modified: August 03, 2023\n",
       "                        <br/>0 comments, 0 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Python Site\" type:Hub Site Application owner:creator1>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site1 = hub_basic.sites.add('Python Site')\n",
    "site1.item"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4d087c50",
   "metadata": {},
   "source": [
    "Creating a Hub Basic Site creates a Site item and the Content Team group for that site, where you can add the items for your site's Content Library. Users with Administrative privileges that create a site will also have a Core Team group created as part of the site, to allow collaboration among members of that team."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "af00e980",
   "metadata": {},
   "source": [
    "You can attach web pages to your site to separate topics and to expand your site's navigation. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4ca431d8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=79711212942a4a81b929c08e640453fa' target='_blank'>\n",
       "                        <img src='http://static.arcgis.com/images/desktopapp.png' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=79711212942a4a81b929c08e640453fa' target='_blank'><b>Python First Page</b>\n",
       "                        </a>\n",
       "                        <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\" width=16 height=16>Hub Page by creator1\n",
       "                        <br/>Last Modified: August 03, 2023\n",
       "                        <br/>0 comments, 1 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Python First Page\" type:Hub Page owner:creator1>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "page1 = site1.pages.add('Python First Page')\n",
    "page1.item"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a513da36",
   "metadata": {},
   "source": [
    "You can also view all pages of a site."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0aeb0a36",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Page title:\"Python First Page\" owner:creator1>]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site1.pages.search()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5f26da8a",
   "metadata": {},
   "source": [
    "### Cloning the site in the same organization\n",
    "\n",
    "Cloning the site in the same organization replicates the layout of the site in its copy."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "451a1782",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=466ff55ee50f48fdb9671e17217a47ef' target='_blank'>\n",
       "                        <img src='http://static.arcgis.com/images/desktopapp.png' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=466ff55ee50f48fdb9671e17217a47ef' target='_blank'><b>Python Site-copy-1691085172864</b>\n",
       "                        </a>\n",
       "                        <br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\" width=16 height=16>Hub Site Application by creator1\n",
       "                        <br/>Last Modified: August 03, 2023\n",
       "                        <br/>0 comments, 1 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Python Site-copy-1691085172864\" type:Hub Site Application owner:creator1>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site1_clone = hub_basic.sites.clone(site1, pages=True)\n",
    "site1_clone.item"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "49023c11",
   "metadata": {},
   "source": [
    "### Cloning the site in an ArcGIS Enterprise organization\n",
    "\n",
    "A feature exclusive to the Python API version of ArcGIS Hub, is the ability to clone sites and initiatives between ArcGIS Online and ArcGIS Enterprise Organizations.\n",
    "\n",
    "Once we sign into our ArcGIS Enterprise target organization, we will be able to clone this site there, allowing us to use the same layout of this site without having to re-create and re-configure it in another organization.\n",
    "\n",
    ">_Note:_ This workflow is for demonstration purposes only. To replicate this, you may have to sign-in to an ArcGIS Enterprise organization you have access to.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "61543a8a",
   "metadata": {},
   "outputs": [],
   "source": [
    "gis_portal = GIS(profile='your_enterprise_profile')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "98de93fc",
   "metadata": {},
   "source": [
    "We can work with Enterprise Sites using the `sites` property of the `GIS` object. \n",
    "\n",
    "We will now clone our site from the Hub Basic organization to the Enterprise organization in the same way we cloned it previously."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "05afca1a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://rpubs22001.ags.esri.com/portal/home//home/item.html?id=483d171f82dd4867bbf8a1dd6efae733' target='_blank'>\n",
       "                        <img src='https://rpubs22001.ags.esri.com/portal/home//portalimages/desktopapp.png' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://rpubs22001.ags.esri.com/portal/home//home/item.html?id=483d171f82dd4867bbf8a1dd6efae733' target='_blank'><b>Python Site-copy-1691085190829</b>\n",
       "                        </a>\n",
       "                        <br/><img src='https://rpubs22001.ags.esri.com/portal/home//home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\" width=16 height=16>Site Application by creator1\n",
       "                        <br/>Last Modified: August 03, 2023\n",
       "                        <br/>0 comments, 0 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Python Site-copy-1691085190829\" type:Site Application owner:creator1>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_portal = gis_portal.sites.clone(site1, pages=True)\n",
    "site_portal.item"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e993de44",
   "metadata": {},
   "source": [
    "Similar to Hub Basic Sites, Enterprise Sites also come with a Site item and the Content Team group for that site, where you can add the items for your site's Content Library. Users with Administrative privileges that create a site will also have a Core Team group created as part of the site, to allow collaboration among members of that team."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "61ffcf7f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Page title:\"Python First Page-copy-1691085195043\" owner:creator1>]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_portal.pages.search()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "426f220a",
   "metadata": {},
   "source": [
    "As we see above, the page and site were cloned successfully."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f5af12f6",
   "metadata": {},
   "source": [
    "### Cloning the site in an ArcGIS Premium organization\n",
    "\n",
    "We will now sign into an organization with Hub Premium enabled and will connect to the Hub associated with it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "d6e8fb23",
   "metadata": {},
   "outputs": [],
   "source": [
    "gis2 = GIS(profile=\"your_online_hub_premium_profile\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "addd8fec",
   "metadata": {},
   "outputs": [],
   "source": [
    "hub_premium = gis2.hub"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dcb0c70b",
   "metadata": {},
   "source": [
    "We will use the same `clone` method on the target organization to clone this site. However, for a Hub Premium organization, your `clone` renders an `initiative` with the site included."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "93251dbf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://dcdev.maps.arcgis.com/home/item.html?id=4d6933ca933f456395c0ec53f1855ca8' target='_blank'>\n",
       "                        <img src='http://static.arcgis.com/images/desktopapp.png' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://dcdev.maps.arcgis.com/home/item.html?id=4d6933ca933f456395c0ec53f1855ca8' target='_blank'><b>Python Site-copy-1691085203041</b>\n",
       "                        </a>\n",
       "                        <br/>Create your own initiative by combining existing applications with a custom site. Use this initiative to form teams around a problem and invite your community to participate.<img src='https://dcdev.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\" width=16 height=16>Hub Initiative by creator1\n",
       "                        <br/>Last Modified: August 03, 2023\n",
       "                        <br/>0 comments, 1 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Python Site-copy-1691085203041\" type:Hub Initiative owner:creator1>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "initiative_clone = hub_premium.sites.clone(site1, pages=True)\n",
    "initiative_clone.item"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "54faf6b7",
   "metadata": {},
   "source": [
    "If you notice above, cloning a site in a Hub Premium environment gave us a Hub Initiative. A Hub Initiative comes with an Initiative item and a Site item. You also get a Content Team group created to manage the content in your initiative's content library and a Followers Team group that maintains a list of the followers of the initiative. Users with Administrative privileges that create an initiative will also have a Core Team group created as part of the initiative, to allow collaboration among members of that team."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "656458b6",
   "metadata": {},
   "source": [
    "We will now fetch the site for this initiative."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "d627bf66",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Site title:\"Python Site-copy-1691085203041\" owner:creator1>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_premium = hub_premium.sites.get(initiative_clone.site_id)\n",
    "site_premium"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "cb911540",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Page title:\"Python First Page-copy-1691085212588\" owner:creator1>]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_premium.pages.search()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c2cddbe5",
   "metadata": {},
   "source": [
    "We can see that the page was cloned successfully.\n",
    "\n",
    "Next, we will fetch a page from another site and link it to this site. Page linking can be useful when you have certain pages in the same organization that are applicable to multiple sites (e.g., F.A.Q. pages, Contact Information pages, etc.) but you do not want to recreate multiple copies of those pages. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ed201afd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://dcdev.maps.arcgis.com/home/item.html?id=1c75da020b2f4943a3f657ef59fc1bc8' target='_blank'>\n",
       "                        <img src='' width='200' height='133' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://dcdev.maps.arcgis.com/home/item.html?id=1c75da020b2f4943a3f657ef59fc1bc8' target='_blank'><b>page space</b>\n",
       "                        </a>\n",
       "                        <br/><img src='https://dcdev.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/layers16.png' style=\"vertical-align:middle;\" width=16 height=16>Hub Page by creator1\n",
       "                        <br/>Last Modified: August 03, 2023\n",
       "                        <br/>0 comments, 161 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"page space\" type:Hub Page owner:creator1>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_page = hub_premium.pages.get('1c75da020b2f4943a3f657ef59fc1bc8')\n",
    "new_page.item"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "72ad4b0d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Page title:\"Python First Page-copy-1691085212588\" owner:creator1>,\n",
       " <Page title:\"page space\" owner:creator1>]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_premium.pages.link(new_page, slug='linked Second Page')\n",
    "site_premium.pages.search()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c29a2650",
   "metadata": {},
   "source": [
    "We can also unlink pages from sites:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "c44951ff",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Page title:\"Python First Page-copy-1691085212588\" owner:creator1>]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_premium.pages.unlink(new_page)\n",
    "site_premium.pages.search()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7d9ffa4c",
   "metadata": {},
   "source": [
    "The page was unlinked from this site, without being deleted."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "490bd5e8",
   "metadata": {},
   "source": [
    "### Deleting our sites and initiative\n",
    "\n",
    "We will now delete the sites and initiative we created. Deleting a site or initiative not only deletes the items but also the groups created initially. If a site has a page that is not linked to any other site, deleting the site also deletes the page."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "465af319",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site1.delete()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "598fc0e4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site1_clone.delete()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "cc89a852",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "site_portal.delete()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "c8330e21",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "initiative_clone.delete()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.17"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
